The invention relates to a method for controlling an electrical machine, and to an apparatus for controlling it. A control unit is used in a method for controlling an electrical machine. The control unit is advantageously configurable. The control unit has, for example, a current regulator, a speed regulator or a further additional regulator. At least one of these regulators can be configured by means of at least one parameter. Regulators, for example, have different control elements. Control elements are, for example, P elements (amplification elements), D elements (differential elements), I elements (integrated elements) etc. Control elements such as these have parameters such as gain factors P or else differential time constants TD, or else integrating time constants Ti. Timers, gain factors and/or time constants such as these are examples of parameters.
The electrical machine is intended, for example, for the movement of a machine part. The machine part is, for example, a part of a machine tool, of a production machine or of an automatic handling machine. The machine part may, however, also be a part of the electrical machine itself, for example a rotor of a rotating electrical machine or else a primary part or a secondary part of a linear motor. In the case of a linear motor, either the primary part or else the secondary part can be moved linearly. The secondary part, which has permanent magnets, is generally stationary, and the primary part, which has at least one winding through which a current can be passed, can be moved linearly.
The electrical machine is thus either a rotating electrical machine or a linear motor. In the case of a rotating electrical machine, the moving machine part is, for example, driven directly by the electrical machine, or else via a gearbox or via a means for power transmission, such as a toothed belt or the like.
The constraints for movement (linear or rotational) of the electrical machine may vary depending on the position of the machine part which can be moved. One constraint is, for example, a coefficient of friction, which is dependent on the position of the machine part. In the case of a linear motor, or else in the case of a rotated electrical synchronous machine with permanent-magnet excitation, for example, it is also possible for the permanent magnets on the secondary part of the linear motor or on the rotor to have different magnetization. The magnetization is thus an example of a further constraint. The resultant electromagnetic force EMK differs, depending on the magnetization. In the case of a linear motor, for example, the electromagnetic force EMF also differs because the primary part moves over a section of the secondary part which is free of any cover protecting this secondary part.
According to the prior art, the parameters for controlling a control unit for the electrical machine must be set in such a way that, on average, they produce an optimum control setting for all positions of the electrical machine. This means that the electrical machine is configured optimally with respect to the control system in no position, or only in a small number of positions, of a moving machine part.